import { defHttp } from '/@/utils/http/axios';
// @ts-ignore
import { GetPermissionInfoModel, PermissionPageParams } from './model/permissionModel';
import { ErrorMessageMode } from '/#/axios';

enum Api {
  PermissionPage = '/shop-admin/api/v1/admin/permission',
}

/**
 * @description: getUserInfo
 */
export function getPermissions(params: PermissionPageParams, mode: ErrorMessageMode = 'modal') {
  return defHttp.get<GetPermissionInfoModel>(
    { url: Api.PermissionPage, params },
    { errorMessageMode: mode },
  );
}
